package com.wh.aop.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

//@Component
//@Aspect
@Slf4j
public class AspectText2 {

    @Pointcut("execution(* com.wh.aop.controller.*.*(..))")
    public void pt() {
    }

    @Around("pt()")
    public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
        log.info("AspectText do around before....");
        Object proceed = joinPoint.proceed();
        log.info("AspectText do around after....");
        return proceed;
    }

}
